home *** CD-ROM | disk | FTP | other *** search
- head 1.5;
- branch ;
- access ;
- symbols ;
- locks ; strict;
- comment @ * @;
-
-
- 1.5
- date 89.01.27.21.09.39; author rab; state Exp;
- branches ;
- next 1.4;
-
- 1.4
- date 88.07.28.17.42.45; author ouster; state Exp;
- branches ;
- next 1.3;
-
- 1.3
- date 88.07.25.10.50.23; author ouster; state Exp;
- branches ;
- next 1.2;
-
- 1.2
- date 88.07.11.15.40.45; author ouster; state Exp;
- branches ;
- next 1.1;
-
- 1.1
- date 88.06.19.16.55.59; author ouster; state Exp;
- branches ;
- next ;
-
-
- desc
- @@
-
-
- 1.5
- log
- @Fixed spelling of execlp for lint.
- @
- text
- @/*
- * execlp.c --
- *
- * Source code for the execlp library procedure.
- *
- * Copyright 1988 Regents of the University of California
- * Permission to use, copy, modify, and distribute this
- * software and its documentation for any purpose and without
- * fee is hereby granted, provided that the above copyright
- * notice appear in all copies. The University of California
- * makes no representations about the suitability of this
- * software for any purpose. It is provided "as is" without
- * express or implied warranty.
- */
-
- #ifndef lint
- static char rcsid[] = "$Header: /sprite/src/lib/c/exec/RCS/execlp.c,v 1.4 88/07/28 17:42:45 ouster Exp Locker: rab $ SPRITE (Berkeley)";
- #endif not lint
-
- #include <stdlib.h>
- #include <varargs.h>
-
- /*
- * Library imports:
- */
-
- extern char **environ;
- extern execvp();
- extern char **_ExecArgs();
-
-
- /*
- *----------------------------------------------------------------------
- *
- * execlp --
- *
- * Execute a process, using the current environment variable,
- * instead of an explicitly-supplied one, and with arguments
- * in-line instead of in a separate array. Also, imitate the
- * shell's actions in trying each directory in a search path
- * (given by the "PATH" environment variable).
- *
- * Results:
- * This procedure returns only if the exec fails. In this case
- * the return value is -1.
- *
- * Side effects:
- * Overlays the current process with a new image. See the man
- * page for details.
- *
- *----------------------------------------------------------------------
- */
-
- #ifndef lint
- int
- execlp(va_alist)
- va_dcl /* Name of file containing program to exec,
- * followed by one or more arguments of type
- * "char *", terminated by a zero argument. */
- {
- char *name;
- char **argv;
- va_list args;
-
- va_start(args);
- name = va_arg(args, char *);
- argv = _ExecArgs(&args);
- execvp(name, argv);
- free((char *) argv);
- return -1;
- }
- #else
- /* VARARGS2 */
- /* ARGSUSED */
- int
- execlp(file, arg1)
- char *file;
- char *arg1;
- {
- return 0;
- }
- #endif
- @
-
-
- 1.4
- log
- @Add #ifdefs to generate correct lint library.
- @
- text
- @d17 1
- a17 1
- static char rcsid[] = "$Header: execlp.c,v 1.3 88/07/25 10:50:23 ouster Exp $ SPRITE (Berkeley)";
- d76 1
- a76 1
- execl(file, arg1)
- @
-
-
- 1.3
- log
- @Lint.
- @
- text
- @d17 1
- a17 1
- static char rcsid[] = "$Header: execlp.c,v 1.2 88/07/11 15:40:45 ouster Exp $ SPRITE (Berkeley)";
- d54 1
- a54 1
- /* VARARGS0 */
- d72 11
- @
-
-
- 1.2
- log
- @When using varargs, only have a single argument in the list.
- @
- text
- @d17 1
- a17 1
- static char rcsid[] = "$Header: execlp.c,v 1.1 88/06/19 16:55:59 ouster Exp $ SPRITE (Berkeley)";
- d20 1
- @
-
-
- 1.1
- log
- @Initial revision
- @
- text
- @d17 1
- a17 1
- static char rcsid[] = "$Header: proto.c,v 1.2 88/03/11 08:39:08 ouster Exp $ SPRITE (Berkeley)";
- d53 1
- d55 4
- a58 4
- execlp(name, va_alist)
- char *name; /* Name of file containing program to exec. */
- va_dcl /* One or more arguments of type "char *",
- * terminated by a zero argument. */
- d60 1
- d65 1
- @
-